﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using btnet;

/// <summary>
/// Summary description for categories
/// </summary>
public partial class categories : System.Web.UI.Page
{
    protected DataSet ds;
    protected Security security;
    void Page_Load(Object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            String footer_label = null;
            if (Application["custom_footer"] != null)
            {
                footer_label = (String)Application["custom_footer"];
            }
            custom_footer_label.Text = footer_label;
        }

        Util.do_not_cache(Response);
        security = new Security();
        security.check_security(HttpContext.Current, Security.MUST_BE_ADMIN);
        titl.InnerText = Util.get_setting("AppTitle", "BugTracker.NET") + " - "
            + "categories";
        ds = btnet.DbUtil.get_dataset(
            @"select
		ct_id [id],
		ct_name [category],
		ct_sort_seq [sort seq],
		case when ct_default = 1 then 'Y' else 'N' end [default],
		ct_id [hidden]
		from categories order by ct_name");
    }
}
